package net.hn.hnms.sys.message.api;

import io.swagger.annotations.ApiParam;
import net.hn.hnms.sys.common.core.constant.ServiceNameConstants;
import net.hn.hnms.sys.common.core.exception.ServiceException;
import net.hn.hnms.sys.message.api.domain.SysSms;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.Map;

/**
 * 短信服务
 *
 * @author Lion Li
 */
@FeignClient(contextId = "RemoteSmsService", value = ServiceNameConstants.MESSAGE_SERVICE)
public interface RemoteSmsService {

    /**
     * 发送短信
     *
     * @param phones     电话号(多个逗号分割)
     * @param templateId 模板id
     * @param param      模板对应参数
     */
    @PostMapping("/sms/send")
    public SysSms send(String phones, String templateId, Map<String, String> param) throws ServiceException;

    /**
     * 功能描述: 山东鼎信提供短信服务
     * @auther: WangLong
     * @date: 2022/7/13 16:42
     * @param phoneNumber 手机号
     * @param param  要发送的短信验证码
     * @return void
     */

    @PostMapping("sms/sendShortMessage")
    public static void sendShortMessage(@ApiParam(value = "手机号码",required = true) String phoneNumber,
                                        @ApiParam(value = "验证码",required = true) String param) throws Exception {

    }
}
